Skip to content

fix: removing time machine to fix auth - #5975

Open
cmgoffena13 wants to merge 1 commit into
SQLMesh:mainfrom
cmgoffena13:fix/bigquery-ci
Open

fix: removing time machine to fix auth#5975
cmgoffena13 wants to merge 1 commit into
SQLMesh:mainfrom
cmgoffena13:fix/bigquery-ci

Conversation

@cmgoffena13

Copy link
Copy Markdown
Collaborator

Description

time_machine freezes the process clock to 2023. Google service-account JWTs use that clock for iat/exp, so GCP rejects the token (invalid_grant / “reasonable timeframe”). The test never reaches real BigQuery auth with a valid token.

Addresses #5968

BigQuery Test Pipeline Succeeds

Checklist

  • I have run make style and fixed any issues
  • I have added tests for my changes (if applicable)
  • All existing tests pass (make fast-test)
  • My commits are signed off (git commit -s) per the DCO

Signed-off-by: Cortland Goffena <30168413+cmgoffena13@users.noreply.github.com>
@cmgoffena13 cmgoffena13 linked an issue Aug 24, 2026 that may be closed by this pull request
@mday-io

mday-io commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

this same root cause likely also affects tests/core/engine_adapter/integration/test_freshness.py. That file has 3 unguarded time_machine.travel(...) calls (lines 80, 208, 346) in tests that run against every engine via the shared ctx fixture — including bigquery, since make bigquery-test runs pytest -m "bigquery" and that marker gets applied to any test parametrized against the bigquery engine, not just this file.

Notably, test_freshness.py already has a precedent for this exact bug class — an autouse _skip_snowflake fixture with the comment "snowflake.connector generates an invalid JWT when time_travel changes the system time" — but nothing equivalent for bigquery. test_integration.py:2478 sidesteps it too, via if not ctx.is_remote:.

Since engine-tests-cloud only runs on main (not on PR branches), this won't show up in this PR's CI — but I'd expect those test_freshness.py tests to fail with the same invalid_grant error on the next post-merge cloud run. Worth either extending this fix to that file, or adding a _skip_bigquery-style guard, in this PR or a fast follow-up.

@mday-io
mday-io self-requested a review August 24, 2026 22:37
@cmgoffena13

cmgoffena13 commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator Author

@mday-io -- so my defense is I wrote this test thats breaking stuff lol -- if I look at previous commits BigQuery started failing just on this test. I don't need time machine for it really though, just need a run to happen. I'll take a look at the snowflake fixture though, worth learning more about some of these tests. If some if these start randomly breaking we can investigate further, but I say good to merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI Fix - BigQuery CI Currently Failing

2 participants